var topPopover=new Vue({
    el:"#topPopover",
    data:{
        HeaderTitleList:[
            {
                type:0,
                content:"个人订单"
            },
            {
                type:1,
                content:"体检卡订单"
            },
            {
                type:2,
                content:"企业订单"
            }
        ]
    },
    methods:{
        toggle:function(value,type){
            header.HeaderTitle=value;
            AllOrder.NowTab=type;
        }
    }
});
var header=new Vue({
    el:".mui-bar",
    data:{
        HeaderTitle:topPopover.HeaderTitleList[0].content

    }
});
var AllOrder=new Vue({
    el:".mui-content",
    data:{
        NowTab:1,
        orders:[
            {
                shopName:"祺云大健康",
                shopState:0,
                products:[
                    {purl:staticUrl+"/static/imgs/CardImg.png",pPrice:54.45},
                    {purl:staticUrl+"/static/imgs/CardImg.png",pPrice:33454.64},
                    {purl:staticUrl+"/static/imgs/CardImg.png",pPrice:34524.64},
                    {purl:staticUrl+"/static/imgs/CardImg.png",pPrice:324.64},
                    {purl:staticUrl+"/static/imgs/CardImg.png",pPrice:344.64},
                    {purl:staticUrl+"/static/imgs/CardImg.png",pPrice:5546.11}
                ]
            },
            {
                shopName:"祺云大健康",
                shopState:11,
                products:[
                    {
                        purl:staticUrl+"/static/imgs/CardImg.png",
                        pName:"豪华型体检项目【男】",
                        pTime:"请提前两天预约",
                        isShowInfo:false,
                        pPrice:5546.11
                    },
                    {
                        purl:staticUrl+"/static/imgs/CardImg.png",
                        pName:"豪华型体检项目【女】",
                        pTime:"请提前三天预约",
                        isShowInfo:false,
                        pPrice:546.11
                    },
                ]
            },
            {
                shopName:"仁爱医院",
                shopState:13,
                products:[
                    {
                        pImg:staticUrl+"/static/imgs/CardImg.png",
                        pName:"豪华型套餐【男】",
                        pTime:"2017-12-02 08:30"
                    },
                    {
                        pImg:staticUrl+"/static/imgs/CardImg.png",
                        pName:"豪华型套餐【女】",
                        pTime:"2017-12-04 08:30"
                    }
                ]
            },
            {
                shopName:"昆明医科大学第一附属医院",
                shopState:3,
                products:[
                    {
                        pImg:staticUrl+"/static/imgs/CardImg.png",
                        pName:"豪华型套餐【中】",
                        pTime:"2017-12-06 08:30"
                    }
                ]
            }
        ],
        checkCard:[
            {
                shopName:"祺云大健康",
                shopState:0,
                products:[
                    {purl:staticUrl+"/static/imgs/CardImg.png",pName:"超值体检卡",pPrice:54.45},
                    {purl:staticUrl+"/static/imgs/CardImg.png",pName:"超值体检卡",pPrice:33454.64},
                    {purl:staticUrl+"/static/imgs/CardImg.png",pName:"超值体检卡",pPrice:34524.64},
                    {purl:staticUrl+"/static/imgs/CardImg.png",pName:"超值体检卡",pPrice:324.64},
                    {purl:staticUrl+"/static/imgs/CardImg.png",pName:"超值体检卡",pPrice:344.64},
                    {purl:staticUrl+"/static/imgs/CardImg.png",pName:"超值体检卡",pPrice:5546.11}
                ]
            },
            {
                shopName:"祺云大健康",
                shopState:14,
                paid:15,
                products:[
                    {pImg:staticUrl+"/static/imgs/CardImg.png",pName:"优惠体检卡",pPrice:200,pNum:6},
                    {pImg:staticUrl+"/static/imgs/CardImg.png",pName:"超值体检卡",pPrice:5999,pNum:2}
                ]
            },
            {
                shopName:"祺云大健康",
                shopState:15,
                payNum:15,
                products:[
                    {pImg:staticUrl+"/static/imgs/CardImg.png",pName:"超值体检卡",pPrice:324.64},
                    {pImg:staticUrl+"/static/imgs/CardImg.png",pName:"超值体检卡",pPrice:344.64},
                    {pImg:staticUrl+"/static/imgs/CardImg.png",pName:"超值体检卡",pPrice:5546.11}
                ]
            },
        ]
    },
    methods:{
        toggelInfo:function(shopInfo,product)
        {
            product.isShowInfo=!product.isShowInfo;
        }
    },
    filters:{
        prices:function(value)
        {
            var result=0;
            for(var i=0;i<value.products.length;i++)
            {
                result+=value.products[i].pPrice;
            }
            return result.toFixed(2);
        }
    }
});
initFreeSwiper({
    target:".swiper-container"
});
mui.init({
    swipeBack: true //启用右滑关闭功能
});
mui('.mui-scroll-wrapper').scroll();